package pta03;

import java.util.Arrays;
import java.util.Scanner;
import java.lang.Math;


class Rectangle{
	private int width;
	private int length;
	
	public void setWidth(int width) {
		this.width = width;
	}
	public void setLength(int length) {
		this.length = length;
	}
	public int getWidth() {
		return width;
	}
	public int getLength() {
		return length;
	}
	public Rectangle(int width,int length){
		this.width=width;
		this.length=length;
	}
	@Override
	public String toString() {
		return "Rectangle [width=" + width + ", length=" + length + "]";
	}
	public static int getPerimeter(int width,int length){
		return 2*(width+length);
	}
	public static int getArea(int width,int length){
		return width*length;
	}
}

class Circle{
	private int radius;
	
	public void setRadius(int radius) {
		this.radius = radius;
	}
	public int getRadius() {
		return radius;
	}
	
	public Circle(int radius){
		this.radius=radius;
	}
	@Override
	public String toString() {
		return "Circle [radius=" + radius + "]";
	}
	public static int getPerimeter(int radius){
		return (int) (2*radius*Math.PI);
	}
	public static int getArea(int radius){
		return (int) (radius*radius*Math.PI);
	}
}

public class main03 {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner in=new Scanner(System.in);
		Rectangle[] rectangles=new Rectangle[2];
		Circle[] circles=new Circle[2];
		for(int j=0;j<rectangles.length;j++){
			Rectangle rectangle=new Rectangle(in.nextInt(),in.nextInt());
			rectangles[j]=rectangle;
		}
		for(int j=0;j<rectangles.length;j++){
			Circle circle=new Circle(in.nextInt());
			circles[j]=circle;
		}
		int sum1=0,sum2=0;
		for(int j=0;j<2;j++){
			sum1=sum1+Circle.getPerimeter(circles[j].getRadius());
			sum1=sum1+Rectangle.getPerimeter(rectangles[j].getWidth(),rectangles[j].getLength());
			sum2=sum2+Circle.getArea(circles[j].getRadius());
			sum2=sum2+Rectangle.getArea(rectangles[j].getWidth(),rectangles[j].getLength());
		}
		System.out.println(sum1);
		System.out.println(sum2);
		System.out.println(Arrays.deepToString(rectangles));
		System.out.println(Arrays.deepToString(circles));
		
	}
}
